home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 October: Mac OS SDK / Dev.CD Oct 00 SDK1.toast / Development Kits / Cross Platform / QuickTime 4.1.2 Windows SDK / RIncludes / OpenTransportProviders.r < prev    next >
Encoding:
Text File  |  2000-04-12  |  9.6 KB  |  236 lines  |  [TEXT/R*ch]

  1. /*
  2.      File:        OpenTransportProviders.r
  3.  
  4.      Contains:    This file contains provider-specific definitions for various built-in providers.
  5.  
  6.      Version:    Technology:    2.5
  7.                  Release:    QuickTime 4.1
  8.  
  9.      Copyright:    © 1993-1999 by Apple Computer, Inc. and Mentat Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17.  
  18. #ifndef __OPENTRANSPORTPROVIDERS_R__
  19. #define __OPENTRANSPORTPROVIDERS_R__
  20.  
  21. #ifndef __CONDITIONALMACROS_R__
  22. #include "ConditionalMacros.r"
  23. #endif
  24.  
  25. /* Shared library prefixes*/
  26.  
  27. /* Module Names*/
  28.  
  29.  
  30. #define kDNRName        "dnr"
  31. #define kTCPName        "tcp"
  32. #define kUDPName        "udp"
  33. #define kRawIPName        "rawip"
  34.  
  35. /* XTI Options*/
  36.  
  37. /* Protocol levels*/
  38.  
  39. #define INET_IP                         0x00
  40. #define INET_TCP                         0x06
  41. #define INET_UDP                         0x11
  42.  
  43. /* TCP Level Options*/
  44.  
  45. #define TCP_NODELAY                     0x01
  46. #define TCP_MAXSEG                         0x02
  47. #define TCP_NOTIFY_THRESHOLD             0x10                /* * not a real XTI option  */
  48. #define TCP_ABORT_THRESHOLD             0x11                /* * not a real XTI option  */
  49. #define TCP_CONN_NOTIFY_THRESHOLD         0x12                /* * not a real XTI option  */
  50. #define TCP_CONN_ABORT_THRESHOLD         0x13                /* * not a real XTI option  */
  51. #define TCP_OOBINLINE                     0x14                /* * not a real XTI option  */
  52. #define TCP_URGENT_PTR_TYPE             0x15                /* * not a real XTI option  */
  53. #define TCP_KEEPALIVE                     0x0008                /*  keepalive defined in OpenTransport.h  */
  54.  
  55. #define T_GARBAGE                         2
  56. /* UDP Level Options*/
  57.  
  58. #define UDP_CHECKSUM                     0x0600
  59. #define UDP_RX_ICMP                     0x02
  60.  
  61. /* IP Level Options*/
  62. #define kIP_OPTIONS                     0x01
  63. #define kIP_TOS                         0x02
  64. #define kIP_TTL                         0x03
  65. #define kIP_REUSEADDR                     0x04
  66. #define kIP_DONTROUTE                     0x10
  67. #define kIP_BROADCAST                     0x20
  68. #define kIP_REUSEPORT                     0x0200
  69. #define kIP_HDRINCL                     0x1002
  70. #define kIP_RCVOPTS                     0x1005
  71. #define kIP_RCVDSTADDR                     0x1007
  72. #define kIP_MULTICAST_IF                 0x1010                /*  set/get IP multicast interface     */
  73. #define kIP_MULTICAST_TTL                 0x1011                /*  set/get IP multicast timetolive     */
  74. #define kIP_MULTICAST_LOOP                 0x1012                /*  set/get IP multicast loopback     */
  75. #define kIP_ADD_MEMBERSHIP                 0x1013                /*  add an IP group membership         */
  76. #define kIP_DROP_MEMBERSHIP             0x1014                /*  drop an IP group membership         */
  77. #define kIP_BROADCAST_IFNAME             0x1015                /*  Set interface for broadcasts      */
  78. #define kIP_RCVIFADDR                     0x1016                /*  Set interface for broadcasts      */
  79.  
  80. /*
  81.  * The value of some of the following constants may conflict with 
  82.  * the values found in the BSD header netinet/in.h.
  83.  * Use instead the constant defined in the enum, for example use 
  84.  * kIP_OPTIONS instead of IP_OPTIONS.
  85.  */
  86. #define IP_OPTIONS                         0x01
  87. #define IP_TOS                             0x02
  88. #define IP_TTL                             0x03
  89. #define IP_REUSEADDR                     0x04
  90. #define IP_DONTROUTE                     0x10
  91. #define IP_BROADCAST                     0x20
  92. #define IP_REUSEPORT                     0x0200
  93. #define IP_HDRINCL                         0x1002
  94. #define IP_RCVOPTS                         0x1005
  95. #define IP_RCVDSTADDR                     0x1007
  96. #define IP_MULTICAST_IF                 0x1010                /*  set/get IP multicast interface     */
  97. #define IP_MULTICAST_TTL                 0x1011                /*  set/get IP multicast timetolive     */
  98. #define IP_MULTICAST_LOOP                 0x1012                /*  set/get IP multicast loopback     */
  99. #define IP_ADD_MEMBERSHIP                 0x1013                /*  add an IP group membership         */
  100. #define IP_DROP_MEMBERSHIP                 0x1014                /*  drop an IP group membership         */
  101. #define IP_BROADCAST_IFNAME             0x1015                /*  Set interface for broadcasts      */
  102. #define IP_RCVIFADDR                     0x1016                /*  Set interface for broadcasts      */
  103.  
  104.  
  105. #define DVMRP_INIT                         100                    /*  DVMRP-specific setsockopt commands, from ip_mroute.h */
  106. #define DVMRP_DONE                         101
  107. #define DVMRP_ADD_VIF                     102
  108. #define DVMRP_DEL_VIF                     103
  109. #define DVMRP_ADD_LGRP                     104
  110. #define DVMRP_DEL_LGRP                     105
  111. #define DVMRP_ADD_MRT                     106
  112. #define DVMRP_DEL_MRT                     107
  113.  
  114.  
  115. /* Shared library prefixes*/
  116.  
  117.  
  118. #define kATalkVersion    "1.1"
  119. #define kATalkPrefix    "ot:atlk$"
  120. #define kATBinderID        "ot:atbd$"
  121.  
  122. /*******************************************************************************
  123. ** Module definitions
  124. ********************************************************************************/
  125. /* XTI Levels*/
  126.  
  127. #define ATK_DDP                         'DDP '
  128. #define ATK_AARP                         'AARP'
  129. #define ATK_ATP                         'ATP '
  130. #define ATK_ADSP                         'ADSP'
  131. #define ATK_ASP                         'ASP '
  132. #define ATK_PAP                         'PAP '
  133. #define ATK_NBP                         'NBP '
  134. #define ATK_ZIP                         'ZIP '
  135.  
  136. /* Module Names*/
  137.  
  138.  
  139. #define kDDPName        "ddp"
  140. #define    kATPName        "atp"
  141. #define kADSPName        "adsp"
  142. #define    kASPName        "asp"
  143. #define kPAPName        "pap"
  144. #define kNBPName        "nbp"
  145. #define kZIPName        "zip"
  146. #define kLTalkName        "ltlk"
  147. #define kLTalkAName        "ltlkA"
  148. #define kLTalkBName        "ltlkB"
  149.  
  150. /*
  151.    Protocol-specific Options
  152.    NOTE:
  153.    All Protocols support OPT_CHECKSUM (Value is (unsigned long)T_YES/T_NO)
  154.    ATP supports OPT_RETRYCNT (# Retries, 0 = try once) and
  155.                    OPT_INTERVAL (# Milliseconds to wait)
  156. */
  157.  
  158. #define DDP_OPT_CHECKSUM                 0x0600
  159. #define DDP_OPT_SRCADDR                 0x2101                /*  DDP UnitDataReq Only - set src address, Value is DDPAddress  */
  160. #define ATP_OPT_REPLYCNT                 0x2110                /*  AppleTalk - ATP Resp Pkt Ct Type, Value is (unsigned long)  pkt count  */
  161. #define ATP_OPT_DATALEN                 0x2111                /*  AppleTalk - ATP Pkt Data Len Type, Value is (unsigned long) length  */
  162. #define ATP_OPT_RELTIMER                 0x2112                /*  AppleTalk - ATP Release Timer Type, Value is (unsigned long) timer, (See Inside AppleTalk, second edition  */
  163. #define ATP_OPT_TRANID                     0x2113                /*  Value is (unsigned long) Boolean, Used to request Transaction ID, Returned with Transaction ID on requests  */
  164. #define PAP_OPT_OPENRETRY                 0x2120                /*  AppleTalk - PAP OpenConn Retry count, Value is (unsigned long) T_YES/T_NO  */
  165.  
  166. /* XTI Level*/
  167. #define COM_SERIAL                         'SERL'
  168.  
  169. #define kSerialABVersion    "1.1.1"
  170.  
  171.  
  172. #define kSerialABName        "serialAB"
  173. #define kSerialName            "serial"
  174. #define kSerialPortAName    "serialA"
  175. #define kSerialPortBName    "serialB"
  176.  
  177. /* Option Management for Serial Drivers*/
  178.  
  179. /*
  180.    These options are all 4-byte values.
  181.    BaudRate is the baud rate.
  182.    DataBits is the number of data bits.
  183.    StopBits is the number of stop bits times 10.
  184.    Parity is an enum
  185. */
  186.  
  187. #define SERIAL_OPT_BAUDRATE             0x0100                /*  UInt32     */
  188. #define SERIAL_OPT_DATABITS             0x0101                /*  UInt32     */
  189. #define SERIAL_OPT_STOPBITS             0x0102                /*  UInt32 10, 15 or 20 for 1, 1.5 or 2     */
  190. #define SERIAL_OPT_PARITY                 0x0103                /*  UInt32     */
  191. #define SERIAL_OPT_STATUS                 0x0104                /*  UInt32  */
  192.                                                             /*  The "Status" option is a 4-byte value option that is ReadOnly */
  193.                                                             /*  It returns a bitmap of the current serial status */
  194. #define SERIAL_OPT_HANDSHAKE             0x0105                /*  UInt32  */
  195.                                                             /*  The "Handshake" option defines what kind of handshaking the serial port */
  196.                                                             /*  will do for line flow control.  The value is a 32-bit value defined by */
  197.                                                             /*  the function or macro SerialHandshakeData below. */
  198.                                                             /*  For no handshake, or CTS handshake, the onChar and offChar parameters */
  199.                                                             /*  are ignored. */
  200. #define SERIAL_OPT_RCVTIMEOUT             0x0106                /*  The "RcvTimeout" option defines how long the receiver should wait before delivering */
  201.                                                             /*  less than the RcvLoWat number of characters.  If RcvLoWat is 0, then the RcvTimeout */
  202.                                                             /*  is how long a gap to wait for before delivering characters.  This parameter is advisory, */
  203.                                                             /*  and serial drivers are free to deliver data whenever they deem it convenient.  For instance, */
  204.                                                             /*  many serial drivers will deliver data whenever 64 bytes have been received, since 64 bytes */
  205.                                                             /*  is the smallest STREAMS buffer size. Keep in mind that timeouts are quantized, so be sure to */
  206.                                                             /*  look at the return value of the option to determine what it was negotiated to. */
  207. #define SERIAL_OPT_ERRORCHARACTER         0x0107                /*  This option defines how characters with parity errors are handled. */
  208.                                                             /*  A 0 value will disable all replacement.  A single character value in the low */
  209.                                                             /*  byte designates the replacement character.  When characters are received with a  */
  210.                                                             /*  parity error, they are replaced by this specified character.  If a valid incoming */
  211.                                                             /*  character matches the replacement character, then the received character's msb is */
  212.                                                             /*  cleared. For this situation, the alternate character is used, if specified in bits */
  213.                                                             /*  8 through 15 of the option long, with 0xff being place in bits 16 through 23. */
  214.                                                             /*  Whenever a valid character is received that matches the first replacement character, */
  215.                                                             /*  it is replaced with this alternate character. */
  216. #define SERIAL_OPT_EXTCLOCK             0x0108                /*  The "ExtClock" requests an external clock.  A 0-value turns off external clocking. */
  217.                                                             /*  Any other value is a requested divisor for the external clock.  Be aware that */
  218.                                                             /*  not all serial implementations support an external clock, and that not all */
  219.                                                             /*  requested divisors will be supported if it does support an external clock. */
  220. #define SERIAL_OPT_BURSTMODE             0x0109                /*  The "BurstMode" option informs the serial driver that it should continue looping, */
  221.                                                             /*  reading incoming characters, rather than waiting for an interrupt for each character. */
  222.                                                             /*  This option may not be supported by all Serial driver */
  223. #define SERIAL_OPT_DUMMY                 0x010A                /*  placeholder */
  224.  
  225. /* XTI Level*/
  226. #define COM_ISDN                         'ISDN'
  227. #define kISDNName        "isdn"
  228. /* Option management calls for ISDN*/
  229. #define ISDN_OPT_COMMTYPE                 0x0200
  230. #define ISDN_OPT_FRAMINGTYPE             0x0201
  231. #define ISDN_OPT_56KADAPTATION             0x0202
  232.  
  233.  
  234. #endif /* __OPENTRANSPORTPROVIDERS_R__ */
  235.  
  236.